package com.wollo.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface RoleMapper {
    //TODO 查询当前用户的角色名称信息
    @Select("select rname from t_role where rid in(select rid from t_user_role where uid=#{uid})")
    List<String> selectRolesByUserIdMapper(Integer uid);

    //TODO 查询当前用户的角色ID
    @Select("select rid from t_user_role where uid=#{uid}")
    List<Integer> selectRoleIdsByUserIdMapper(Integer uid);
}
